by Devin Yang

建立于: 5年前 ( 更新: 5年前 )

本文使用的CentOS 6.2进行,进行重build curl及git过程。
主因是因为作业系统太旧,我想直接由source build最新版本的git。
cat /etc/redhat-release
CentOS release 6.2 (Final)

但进行下方命令时,出现了 SSL connect error的错误。
git clone https://github.com/git/git.git

因为旧版的CentOS,所以网络提供的方式..
yum update -y nss curl
的更新方式无效了,
所以..我就自己重Build curl。
先在另一台电脑,clone,最新版本的curl。
git clone https://github.com/curl/curl

依其说明,查看GIT-INFO档,如何编译。
我运行
./buildconf
./configure
make

就顺顺利利的编译完curl了。接著使用make install直接安装。
完成后,重试git repo的下载(注: 其实到可以到release下载释出的版本)
[root@myserver src]# git clone https://github.com/git/git.git
Cloning into 'git'...
remote: Counting objects: 247464, done.
remote: Total 247464 (delta 0), reused 0 (delta 0), pack-reused 247463
Receiving objects: 100% (247464/247464), 90.42 MiB | 1.16 MiB/s, done.
Resolving deltas: 100% (182891/182891), done.
Checking connectivity... done.

顺立clone了git的source罗.
进入git的repo数据夹。
依README.md说明,查看INSTALL档,如何安装。
$ make configure ;# as yourself
$ ./configure --prefix=/usr ;# as yourself
$ make all doc ;# as yourself
# make install install-doc install-html;# as root

果真,按步施工,保证成功。但我只单纯进行如下动作。打了./configure,不设置prefix。
make configure
./configure
make
make install

就搞定罗,但是,发觉,疑版本是rc1版本。
[root@myserver git]# which git
/usr/local/bin/git
[root@myserver git]# git --version
git version 2.18.0.rc1

虽然是RC的版本了,基本上不太会有问题才对,看起来满正常的..:)
[root@myserver src]# git clone https://github.com/DevinY/dlaravel.git
Cloning into 'dlaravel'...
remote: Counting objects: 1456, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 1456 (delta 27), reused 42 (delta 16), pack-reused 1398
Receiving objects: 100% (1456/1456), 3.03 MiB | 948.00 KiB/s, done.
Resolving deltas: 100% (866/866), done.

想想后,我又重build了2.17.1版了,这次到release处透过wget下载,并解压缩重build。

简单的用,
./configure
make
make install
最后画面如下搞定罗,安装了2.17.1版啦。
		rm -f "$execdir/$p" && \
		test -z "" && \
		ln "$execdir/git-remote-http" "$execdir/$p" 2>/dev/null || \
		ln -s "git-remote-http" "$execdir/$p" 2>/dev/null || \
		cp "$execdir/git-remote-http" "$execdir/$p" || exit; \
	done && \
	./check_bindir "z$bindir" "z$execdir" "$bindir/git-add"
[root@myserver git-2.17.1]# which git
/usr/local/bin/git
[root@myserver git-2.17.1]# git --version
git version 2.17.1
[root@myserver git-2.17.1]#
以上即是这次我在旧版本CentOS 6.2更新git的过程。
 

Tags: linux

Devin Yang

文章内容无法一一说明,如果您有什么不了解处,欢印提问哦:)

No Comment

Post your comment

需要登入才可留言!

类似文章


php,linux

WebShell功能介绍及注意事项

突然想来介绍什么是WebShell就上网找了一个,他的功能已相当好了, 不过我还想要一些功能,於是就用了三个晚上的时间,替他进行了一些小小的优化。 如果,您还没听过WebShell,快来看看这个影片吧。 如果您喜爱我的优化版本,请给我个赞哦,谢谢啦。

linux, centos, rsnapshot

如何在CentOS 7安装rsnapshot

rsnapshot是一个采用rsync为基础的工具,他可以进行快照式的增量备份,不过我们在CentOS下了which rsnapshot怎么没有这个命令呢,用yum install rsnapshot没有辨法安装?

linux

如何建ssh密钥,让自己的电脑可以连到 GCE的instance

最近刚好开始使用Google的GCE,日志一下Goolge官方的说明文档,如何生成密钥给instance使用。 这里的-C comment会用登录使用者的名称,另外-t使用rsa。